from app.api import abstract

MAX_ITEMS = 30

class Action(abstract.Action):
    def _get(self):
        
        tag = self.param("filter")
        
        if tag == "": tag = self.param("tag")
        
        wishes = abstract.models.wish.listByTag(tag, MAX_ITEMS, self.platform_id)
        
        return abstract.models.wish.format(wishes)